package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbPolicyRelatedMapper;
import com.bsb.base.model.BsbPolicyRelated;
import com.bsb.base.model.BsbPolicyRelatedExample;

@Service
public class BsbPolicyRelatedService{
	
	@Resource
	private BsbPolicyRelatedMapper bsbPolicyRelatedMapper;
	
	public void addBsbPolicyRelated(BsbPolicyRelated bsbPolicyRelated) {
		bsbPolicyRelatedMapper.insertSelective(bsbPolicyRelated);
	}
	
	public void delBsbPolicyRelatedByUuid(String uuid) {
		bsbPolicyRelatedMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbPolicyRelated(BsbPolicyRelated bsbPolicyRelated) {
		bsbPolicyRelatedMapper.updateByPrimaryKeySelective(bsbPolicyRelated);
	}
	
	public void updateBsbPolicyRelatedByExample(BsbPolicyRelated bsbPolicyRelated,BsbPolicyRelatedExample bsbPolicyRelatedExample){
	    bsbPolicyRelatedMapper.updateByExampleSelective(bsbPolicyRelated,bsbPolicyRelatedExample);
	}
	
	public BsbPolicyRelated getBsbPolicyRelatedByUuid(String uuid) {
		return bsbPolicyRelatedMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbPolicyRelated> getPageBsbPolicyRelated(BsbPolicyRelatedExample bsbPolicyRelatedExample) {
		return bsbPolicyRelatedMapper.selectPage(bsbPolicyRelatedExample);
	}
	
	public int countBsbPolicyRelated(BsbPolicyRelatedExample bsbPolicyRelatedExample) {
		return bsbPolicyRelatedMapper.countByExample(bsbPolicyRelatedExample);
	}
	
	public List<BsbPolicyRelated> selectByExample(BsbPolicyRelatedExample example){
	    return bsbPolicyRelatedMapper.selectByExample(example);
	}
}
